using System.Collections.Generic;
using JlPay.Sdk.Models;

namespace JlPay.Sdk.Models.Openmerch.Bill
{
    /// <summary>
    /// 订单信息查询请求
    /// @author liaochangyi
    /// @since 2025-01-25
    /// </summary>
    public class OrderInfoQueryRequest : OrgBaseRequest
    {
        /// <summary>
        /// API URL
        /// </summary>
        public const string API_URL = "/open/bill/trans-charge/query";

        /// <summary>
        /// 嘉联订单号
        /// </summary>
        public string? OrderId { get; set; }

        /// <summary>
        /// 转换为字典
        /// </summary>
        /// <returns>字典数据</returns>
        public Dictionary<string, object> ToDictionary()
        {
            var data = new Dictionary<string, object>();

            // 添加基础字段
            if (!string.IsNullOrEmpty(OrgNo))
            {
                data["org_no"] = OrgNo;
            }
            if (!string.IsNullOrEmpty(base.MerchNo))
            {
                data["merch_no"] = base.MerchNo;
            }

            // 添加业务字段
            if (!string.IsNullOrEmpty(OrderId))
            {
                data["order_id"] = OrderId;
            }

            return data;
        }
    }
} 